The Variables area of
QuickCalc stores calculator variables that you can access as needed.
Calculator variables can either be constants or functions.
You
can use the Variables area to define, store, and retrieve calculator
variables. Calculator variables can either be constants
(coordinates/vectors, real numbers, and integers) or functions.
In the Variables area, you can
- Click a calculator variable to display
information such as value, type, and description in the Details
box at the bottom of the Variables area.
- Double-click a calculator variable to
load it into the QuickCalc Input box.
Additional operations
are available on the shortcut menus in the Variables area.
Create New Calculator Variables
You can create new calculator variables using
the shortcut menus in the Variables area. When defining new calculator
variables in the Variable Definition dialog box, the following rules
apply:
- Constants. Any
expression entered in the Value or Expression text entry box is
evaluated before the calculator variable is stored. Calculator variables
that are defined as constants are available “globally.” You can
access and use global constants in different drawings and sessions.
- Functions. Any
expression entered in the Value or Expression text entry box is
stored as text. Functions are evaluated when used in the QuickCalc
Input box.
Create Global Constants
You can use one of the
following methods to create global constants:
- Enter an expression in the Input box
using the format $variable_name=value.
For example, to define the golden ratio to 8 decimal places as a
global constant called Phi, enter $Phi=1.61803399 in the Input box.
- Click the New Variable button in the
Variables area title bar. In the Variables Definition dialog box,
click Constant and fill in the other boxes.
- Right-click the Variables area. Click
New Variable.
Access Global Constants
You can access global
constants and pass them to the Input box of the QuickCalc as follows:
- Double-click a variable in the Variables
area of QuickCalc.
- Click a variable from the list of calculator
variables, and click the Return Variable to Input Area button.
- Enter a dollar sign ($) followed by the
variable name, and press Enter.
To use a global constant
in a text or numeric entry box in a window or dialog box, use the
syntax: =$variable_name followed
by pressing the END key. For example, to use the previously mentioned
global variable, Phi, enter =$Phi and press
the END key.
NoteIn QuickCalc, only
constants can be directly referred to by their global variable names
in the text or numeric entry boxes in windows and dialog boxes.
Use Shortcut Functions
Several sample calculator variables have been
predefined and stored in the Shortcut Functions category. These
are geometric expressions that combine CAL functions with the
Endpoint Snap mode. The following table describes the predefined
variables that are available in the Variables area of the calculator.
Variable
|
Shortcut For
|
Description
|
dee
|
dist(end,end)
|
Distance between two endpoints
|
ille
|
ill(end,end,end)
|
Intersection of two lines defined by four endpoints
|
mee
|
(end+end)/2
|
Midpoint between two endpoints
|
nee
|
nor(end,end)
|
Unit vector in the XY plane and normal to two
endpoints
|
rad
|
rad
|
Radius of a selected circle, arc, or polyline
arc
|
vee
|
vee(end,end)
|
Vector from two endpoints
|
vee1
|
vec1(end,end)
|
Unit vector from two endpoints
|
You can easily modify
these calculator variables or create your own. For more information,
see the CAL command.
Organize Variables into
Categories
You can organize calculator
variables in the Variables area under several categories. This results
in a one-level tree structure. The Shortcut Functions category has
already been created and contains several functions.
Use the shortcut menu
in the Variables area to create, rename, or delete variable categories.
To use a predefined variable in
a QuickCalc expression
- In the Variables area, click the variable
you want to use.
- On the QuickCalc Variables title bar,
click the Return Variable to Input Area button.
The variable is displayed
in the Input box as part of your expression.
To create a new variable
in QuickCalc
- On the QuickCalc Variables title bar,
click the New Variable button.
- In the Variable Definition dialog box,
under Variable Type, select Constant or Function.
- In the Variable Definition dialog box,
under Variable Properties Name, enter a name for the variable. Variable
names cannot contain spaces or special characters.
NoteWhen
referencing this variable from the Input box, the variable name
must begin with the dollar sign ($) to differentiate it from local LISP
variables.
- Under Variable Properties Group With,
click New.
- In the Category Definition dialog box,
under Category Properties Name, enter a name for the new category.
- Under Description, enter a description
for the new category. Click OK.
- In the Variable Definition dialog box,
under Value or Expression, enter a value or expression for the new
variable.
- Under Description, enter a description
of the new variable. Click OK.
The new variable is now
displayed in the Variables area.
To edit a variable in QuickCalc
- In the Variables area, click the variable
you want to edit.
- On the QuickCalc Variables title bar,
click the Edit Variable button.
- In the Variable Definition dialog box,
make the edits to the variable. Click OK.
To delete a variable in
QuickCalc
- In the Variables area, click the variable
you want to delete.
- On the QuickCalc Variables title bar,
click the Delete button.
To create a new global
constant in the Input box of QuickCalc
- In the Input box of QuickCalc, enter
the following syntax: $variable_name=value.
For example, you could center $Phi=1.618
NoteGlobal variables
are not case-sensitive.
QuickCalc adds the global
constant to the list of variables in the Variables area.
To access a global constant
from dialog box or window
- In any text or numeric entry box, enter
an expression using the syntax: =$variable_name followed
by pressing the END key.
To evaluate mathematical
expressions in a dialog box
- If necessary, set the CALCINPUT system
variable to 1.
- In a dialog box, in an area where you
can enter a numeric value, enter a mathematical expression in the
following format: =expression (for example, =5+3).
- Press Alt+Enter on the keyboard.
The expression is evaluated and its value is
displayed.
CommandsQCCLOSE
Closes the QuickCalc
calculator.
QUICKCALC
Opens the QuickCalc
calculator.
System VariablesCALCINPUT
Controls whether mathematical
expressions and global constants are evaluated in text and numeric
entry boxes of windows and dialog boxes.